package com.hmall.service;

import com.hdmall.business.common.common.ServerResponse;
import com.hdmall.business.common.util.HttpClientUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName WeChatService
 * @Description
 * @Author zhoutao
 * @Date 2018/11/26 14:09
 * @Version 2.0
 **/
@Slf4j
@Service
public class WeChatService {

    public ServerResponse getOrderList(Integer pageNum, Integer pageSize) {

        String localhost = "http://192.168.21.9";
        String origin = "116.62.213.144";
        String url = localhost + ":8081/pf/api/order/list2";
        Map map = new HashMap<>();
        map.put("page", pageNum.toString());
        map.put("size", pageSize.toString());
//        map.put("order_status", 0 + "");

        String result = (String)HttpClientUtil.doGetWithParam(url, map);
        log.info(result);
        System.out.println(result);
        return ServerResponse.createBySuccess(result);
    }
}
